stylesheet <xsl:template match="全体/本文">显示的问题不明白

来源:百度知道 编辑:UC知道 时间:2024/07/07 02:16:16
2.xsl 文件
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="全体/本文">
<h1><xsl:value-of select="见出し"/></h1>
</xsl:template>
</xsl:stylesheet>

2.xml文件
<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="2.xsl"?>
<全体>
<题名>Sample02</题名>
<本文>
<见出し>复数段落を表示する</见出し>

</本文>
</全体>

显示结果:
Sample02
复数段落を表示する

2.xsl 文件
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="全体/本文">
<h1><xsl:value-of select="见出し"/></h1>
</xsl:template>
</xsl:stylesheet>

2.xml文件
<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="2.xsl"?>
<全体>
<题名>Sample02</题名>
<本文>
<见出し>复数段落を表示する</见出し>

</本文>
</全体>

显示结果:
Sample02
复数段落を表示する